#ifndef JFISH_H
#define JFISH_H
#include "ScrollingObject.h"

class JellyFish : public ScrollingObject
{
private:
	float startHeight;
	float bobSpeed;
	float bobHeight;
	float bobTimerOffset;
	sf::Clock timer;
public:
	JellyFish(sf::Vector2f startPos = sf::Vector2f(0, 0),
		float scale = 1.0f,
		float bobFrequency = 1.0f,
		float bobAmplitude = 50.0f,
		float bobTimeOffset = 1.0f,
		sf::Vector2f startVel = sf::Vector2f(0, 0),
		const char* fileName = "images/jellyfishImage.png") : ScrollingObject(startPos, startVel, fileName, scale)
	{
		isPhysical = false;
		startHeight = startPos.y;
		bobSpeed = bobFrequency;
		bobHeight = bobAmplitude;
		bobTimerOffset = bobTimeOffset;

	};
	~JellyFish(){};

	void Update(float deltaT)
	{
		ScrollingObject::Update(deltaT);	
		pos = sf ::Vector2f(pos.x, startHeight + (bobHeight * sin((timer.getElapsedTime().asSeconds() + bobTimerOffset) * bobSpeed)));
	}
};

#endif // JFISH_H